#include<iostream>
using namespace std;

class Solution {
public:
	int hammingWeight(uint32_t n) {
		int m=0;
		while (n)
		{
			if (n % 2)m++;
			n = n / 2;
		}
		return m;
	}
};

//int main()
//{
//	Solution *s = new Solution;
//	cout << s->hammingWeight(11);
//	return 0;
//}